.qx-form {
  margin-left: -$space-base;

  &-search {
    overflow: hidden;
  }

  &-item {
    padding-left: $space-base;
  }

  &-item-label {
    height: 3.5rem;
    font-size: 1rem;

    > span {
      line-height: 1.2;
    }
  }

  &-item-label-dense {
    height: 2.25rem;
    font-size: .815rem;
    position: relative;

    > span {
      line-height: 1.2;
      white-space: pre-line;
    }
  }

  &-item-label-top {
    position: relative;
    top: 0;
    height: 1.25rem;
  }

  &-menu {
    margin-left: 0;
    position: relative;
    height: calc(3.5rem + $space-base);
  }

  &-menu-dense {
    margin-left: 0;
    position: relative;
    height: calc(2.25rem + $space-base);
  }

  &-children {
    .q-item {
      min-height: auto;
      border-top-left-radius: .25rem;
      border-top-right-radius: .25rem;
    }

    .q-expansion-item__content {
      > .q-card {
        background-color: transparent;
      }
    }
  }
}

.q-table__top .qx-form {
  overflow: hidden;
}

.qx-form-item-card {
  min-height: 2.25rem;
  margin-bottom: .875rem;

  .q-field--with-bottom {
    padding-bottom: 0;
  }
}

.non-form-label-margin > .qx-form-item-card {
  min-height: 0 !important;
  margin-bottom: 0 !important;
}

.qx-form-search .qx-form-item-card {
  margin-bottom: .5rem;
}

.qx-form-item .q-item__section {
  > .q-field {
    width: 100%;
  }
}

.q-select .q-field__input {
  min-width: 0 !important;
}

.qx-select-selected {
  max-width: calc(100% - .3125rem);
}

.q-field__bottom {
  color: var(--q-warning);
  padding: .0625rem .3125rem 0;
  min-height: auto;
}

.q-form-table tr .q-field__bottom,
.non-field__bottom .q-field__bottom {
  display: none;
}

.q-field__counter {
  color: rgba(0, 0, 0, 0.54);
}

.q-textarea.q-field--dense .q-field__native {
  padding-top: $space-base * 0.5;
}

.q-textarea.q-field--dense .q-field__control,
.q-textarea.q-field--dense .q-field__native {
  min-height: 4.5rem;
}

.q-field__inner {
  &:hover .field-clear-icon,
  &:hover .q-field__focusable-action {
    opacity: .5;
    color: inherit;
    display: inline-block;
  }

  &:hover .q-field__append i + i,
  &:hover .q-field__append:has(.q-field__focusable-action) + .q-field__append {
    opacity: 0;
  }
}

.q-field--readonly {
  .q-field__append i + i,
  .q-field__append + .q-field__append {
    opacity: 0;
  }
}

.field-clear-icon,
.q-field__focusable-action {
  position: absolute;
  right: .75rem;
  opacity: 0;
  z-index: 1;
  color: transparent;
}

.field-clear-icon:hover,
.field-clear-icon:focus,
.q-field__focusable-action:hover,
.q-field__focusable-action:focus {
  opacity: 1 !important;
  color: var(--q-primary) !important;
}

.placeholder,
*::placeholder {
  @include none-select();
  opacity: .3 !important;
  white-space: nowrap;
  overflow: hidden;
}

.q-field--dense .q-field__control,
.q-field--dense .q-field__marginal {
  height: inherit;
}

.q-field__text .q-field__native {
  cursor: text;
}

.q-field__native,
.q-field__prefix,
.q-field__suffix,
.q-field__input {
  line-height: 1.5rem;
}

.q-field--auto-height.q-field--dense .q-field__control,
.q-field--auto-height.q-field--dense .q-field__native,
.q-field--auto-height.q-field--dense .q-field__after {
  min-height: 2.25rem;
}

//.q-field--dense .q-field__after {
//  background-color: $grey-4;
//  padding: $space-base * 0.5;
//  border-radius: 0 $generic-border-radius $generic-border-radius 0;
//}

.q-field__have_after.q-field--outlined .q-field__control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;

  &:before, &:after {
    border-right: 0;
  }
}

.q-textarea {
  .q-field__control {
    height: auto;
    min-height: 4.5rem;
  }
}

.qx-editor {
  height: auto;

  .q-field__control {
    padding: 0;
  }

  .q-field__inner,
  .q-field__control {
    height: auto !important;
  }

  .q-field__native,
  .q-field__prefix,
  .q-field__suffix,
  .q-field__input {
    padding: 0;
  }

  .q-editor {
    width: 100%;
    background-color: inherit;

    .q-editor__content {
      cursor: text;
      padding: .3125rem $space-base;
      @include text-select();
    }
  }

  .q-editor__content:empty:not(:focus):before {
    @include none-select();
    opacity: 0.3;
  }
}

.q-year {
  width: 17.15rem;
  height: 18.75rem;

  .q-year--left-header {
    position: absolute;
    left: $space-base;
  }

  .q-year--view {
    position: absolute;
    top: $space-base;
    left: 2.75rem;
    right: 2.75rem;
    bottom: $space-base;
  }

  .q-year--right-header {
    position: absolute;
    right: $space-base;
  }
}

.q-month {
  width: 17.5rem;
  height: 16.25rem;

  .q-month--header {
    position: absolute;
    top: $space-base;
  }

  .q-month--view {
    position: absolute;
    top: 2.75rem;
    left: $space-base;
    right: $space-base;
    height: 12.875rem;
  }
}

.q-year .q-year--view,
.q-month .q-month--view {
  .q-btn {
    width: 3.4rem;
    border: 0.0625rem solid transparent;
    margin: .285em 0;
  }

  .q-year__start_year,
  .q-month__start_month {
    border-radius: 35% 0 0 35%;
  }

  .q-year__end_year,
  .q-month__end_month {
    border-radius: 0 35% 35% 0;
  }

  .q-year__hover_year,
  .q-month__hover_month {
    border-style: dashed;
    border-color: var(--q-primary);
  }

  .q-year__range::before,
  .q-month__range::before {
    opacity: .3;
    top: -0.0625rem;
    left: -0.0625rem;
    right: -0.0625rem;
    bottom: -0.0625rem;
    background-color: var(--q-primary);
  }
}

.q-date__calendar-item > div,
.q-date__calendar-item button {
  width: 2rem;
  height: 2rem;
}

.qx-time {
  display: flex;
  flex-direction: row;
  padding: 0.25rem 0;

  .q-scrollarea {
    width: 3.75rem;
    height: 13.75rem;
  }

  .q-item .q-item__section {
    height: 1.75rem;
    text-align: center;
  }

  .time-active-cls {
    font-size: 1.25rem;
    font-weight: 600;
  }
}

.qx-date-time {
  padding-bottom: 0;

  > .q-field {
    width: calc(50% - 0.25rem)
  }
}